import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/home.vue'
const router = createRouter({
    history: createWebHashHistory(import.meta.env.BASE_URL), // 路由模式有HTML5和Hash
    // 两种模式
    routes: [
        {
            path: '/', 
            name: 'login',
            component: () => import('../views/login.vue')

        },
        {
            path: '/home',
            name: 'home',
            component: HomeView
        },
        {
            path: '/scenic_map', 
            name: 'scenic_map',
            component: () => import('../views/scenic_map.vue')
        },
         {
            path: '/issue', 
            name: 'issue',
            component: () => import('../views/issue.vue')
        },
        {
            path: '/strategy', 
            name: 'strategy',
            component: () => import('../views/strategy.vue')
        },
        {
            path: '/mine', 
            name: 'mine',
            component: () => import('../views/mine.vue')
        },
        {
            path: '/promotion', 
            name: 'promotion',
            component: () => import('../views/promotion.vue')
        },
        {
            path: '/:pathMatch(.*)*',
            name: 'not_found',
            component: () => import('../views/404.vue')

        },
    ]
})



export default router